from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.

from ws4redis.publisher import RedisPublisher
from ws4redis.redis_store import RedisMessage




def hello(request):
    return render(request,'index.html')

def big():
    print('big world')

def echo(request):
    redis_publisher = RedisPublisher(facility='foobar', broadcast=True)
    message = RedisMessage('Hello World')    
    # and somewhere else
    redis_publisher.publish_message(message)    
    return HttpResponse('ok')